package com.ljw.util;

import lombok.SneakyThrows;

import java.text.SimpleDateFormat;
import java.util.Date;

public class MyDateUtils {

    static SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");

    @SneakyThrows
    public static Date stringToDate(String date){
        return sf.parse(date);
    }

    public static String dateToString(Date date){
        return sf.format(date);
    }

}
